import request from "@/utils/request";

let url = '/smartstudio/area'
export default {
    selectPage(page, pageSize, name) {
        return  request.get(url, {
            params:{
                page: page,
                pageSize: pageSize,
                name: name
            }
        })
    },

    selectAreas() {
        return request.get(url + '/all')
    },

    addArea(area) {
        return request.post(url, area)
    },

    updateArea(area) {
        return request.put(url, area)
    },

    deleteArea(area) {
        return request.delete(url, {data:area})
    },

    areaCount() {
        return request.get(url + '/count')
    },

    removeAll(data){
        return request.delete(url+'/removeAll',{data})
    }
}


// export const selectAreas = () => request.get(url)
